package dao;


import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import entity.User;

public class UserDaoImpl extends SqlMapClientDaoSupport implements UserDaoInterface{
	
	/**
	 * 在classpath中通过通配符insert*配置transactionManager.设置事务!
	 */
	public void insertUser(User user) {
		this.getSqlMapClientTemplate().update("insertUser", user);
	}

	@Override
	public User getUser(String Id) {
		return (User) this.getSqlMapClientTemplate().queryForObject("selectUserById", Id);
	}
}
